package pack0806;

public class DemoZ {
    public static void main(String[] args){
        int i;
        int c1;
        int c2;
        int c3;
        for(i=0;i<=1000;i++){
            c1 = i/100%10;
            c2 = i/10%10;
            c3 = i%10;
            double d1 = Math.pow(c1,3);
            double d2 = Math.pow(c2,3);
            double d3 = Math.pow(c3,3);
            if ((d1+d2+d3)==i){
                System.out.print(i);
                System.out.println("是水仙花数。");
            }
        }
    }
}
